package edu.jxnu.zhangjinsong.unemploymenttracker.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("user")
public class User {
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @TableField
    private String username;

    @TableField
    private String password;

    @TableField
    private String role;

    @TableField("person_id")
    private String personId;
    
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    public enum Role {
        student, admin, advisor
    }
}